<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>日志查看系统</title>
    <link rel="stylesheet"
          href="${pageContext.request.contextPath}/bootstrap-3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet"
          href="${pageContext.request.contextPath}/bootstrap-3.3.5/css/bootstrap-theme.min.css">
    <script src="${pageContext.request.contextPath}/bootstrap-3.3.5/js/jquery-1.11.2.min.js"></script>
    <script src="${pageContext.request.contextPath}/bootstrap-3.3.5/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#content").scrollTop(99999);
        });
    </script>
</head>
<body style="padding: 20px; word-break:break-all;
    overflow-x: hidden;">
<nav class="navbar navbar-inverse  navbar-fixed-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <a class="navbar-brand" href="index.jsp">返回首页</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a class="navbar-brand" href="fileServlet?filePath=${filePath}">返回列表</a></li>
                <li class="active"><a href="#">日志详情 <span class="sr-only">(current)</span></a></li>
            </ul>
            <form class="navbar-form navbar-left" role="search" action="showFile">
                <input type="hidden" name="filePath" value="${filePath}"/>
                <input type="hidden" name="fileName" value="${fileName}"/>

                <div class="form-group">
                    <input type="text" style="width:110px" name="lineNum" class="form-control"
                           placeholder="输入行数查看">
                </div>
                <button type="submit" class="btn btn-default">提交</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li><a class="active" href="#">当前日志路径：${filePath}${fileName}</a></li>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
</nav>
<div id="content" style="margin-top: 47px;
    padding: 10px;
    border: 1px solid red;
    height: 545px;
    overflow-y:auto;">
    <c:forEach var="item" items="${logList}" varStatus="status">
        <div class="text-justify">
                ${item}</div>
        <br>
    </c:forEach>
</div>
<div style="position: absolute;
    bottom: 0;
    margin: 4px auto;
    width: 100%;">
    <div align="center">版权所有 fesine@pactera.com</div>
</div>
</body>
</html>